package common

type ApiRsp struct {
	Code    int         `json:"code"`
	Data    interface{} `json:"data"`
	Message string      `json:"message"`
}

type ApiRspOnly struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func ApiResponse(code int, data interface{}, message string) (apiRsp *ApiRsp) {
	apiRsp = &ApiRsp{Code: code, Data: data, Message: message}
	return
}

func ApiNoDataResponse(code int, message string) (apiRsp *ApiRspOnly) {
	apiRsp = &ApiRspOnly{Code: code, Message: message}
	return
}
